#include<iostream>
#include<algorithm>
using namespace std;
string fun(string str){
    for(int i=0;i<str.length();i++){
        if(str[i]>'A'&&str[i]<'Z')
            if(str[i]<'X')
                str[i]+=3;
            else str[i]-=23;
        else if(str[i]<'x')
                str[i]+=3;
            else str[i]-=23;
        if(str[i]<96)str[i]+=32;
        else str[i]-=32;
    }
    reverse(str.begin(),str.end());
    return str;
}
int main(){
    string str;cin>>str;
    cout<<fun(str)<<endl;
    return 0;
}